package icom.acm.form.mircblog;

import icom.acm.bean.mircblog.T_MB_MESSAGEREPLY;

import java.io.UnsupportedEncodingException;
import java.util.Date;

public class MessageReplyForm {
	private Integer MR_ID;		// 回复消息编号
	private Integer MR_U_ID;	// 用户编号
	private Integer MR_M_ID;	// 回复的微博编号
	private Integer MR_R_ID;	// 回复的回复编号
	private String MR_MSG;		/// 回复内容
	private Date MR_DATE;		// 回复时间
	
	public T_MB_MESSAGEREPLY toBean(){
		T_MB_MESSAGEREPLY e = new T_MB_MESSAGEREPLY();
		e.setMR_DATE(MR_DATE);
		e.setMR_ID(MR_ID);
		e.setMR_U_ID(MR_U_ID);
		e.setMR_M_ID(MR_M_ID);
		e.setMR_R_ID(MR_R_ID);
		e.setMR_MSG(MR_MSG);
		return e;
	}
	
	private String token;

	public String getToken() {
		return token;
	}

	public void setToken(String token) {
		this.token = token;
	}

	public Integer getMR_ID() {
		return MR_ID;
	}

	public void setMR_ID(Integer mR_ID) {
		MR_ID = mR_ID;
	}

	public Integer getMR_U_ID() {
		return MR_U_ID;
	}

	public void setMR_U_ID(Integer mR_U_ID) {
		MR_U_ID = mR_U_ID;
	}

	public Integer getMR_M_ID() {
		return MR_M_ID;
	}

	public void setMR_M_ID(Integer mR_M_ID) {
		MR_M_ID = mR_M_ID;
	}

	public Integer getMR_R_ID() {
		return MR_R_ID;
	}

	public void setMR_R_ID(Integer mR_R_ID) {
		if (mR_R_ID<=0)
			mR_R_ID = null;
		MR_R_ID = mR_R_ID;
	}

	public String getMR_MSG() {
		return MR_MSG;
	}

	public void setMR_MSG(String mR_MSG) {
		try {
			mR_MSG = new String(mR_MSG.getBytes("ISO-8859-1"),"UTF-8");
		} catch (UnsupportedEncodingException e) {
			e.printStackTrace();
		}		
		MR_MSG = mR_MSG;
	}

	public Date getMR_DATE() {
		return MR_DATE;
	}

	public void setMR_DATE(Date mR_DATE) {
		MR_DATE = mR_DATE;
	}	
	
}
